﻿using System;

namespace Nxg.Blog.Core.Commands.Posts
{
    public class GetSlugCommand
    {
        public string Title { get; set; }

    }

    public class GetSlugCommandInvoker : ICommandInvoker<GetSlugCommand, CommandResult<string>>
    {
        public CommandResult<string> Execute(GetSlugCommand command)
        {
            return CommandResult<string>.GetSuccessResult(command.Title.ToSlug());
        }
    }
}